package com.example.demo.modules.controller;

import org.springframework.boot.autoconfigure.web.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PageController implements ErrorController{
	private static final String ERROR_PATH = "/error";
	
	@RequestMapping(value= {"/", "/index", "/index.html"})
	public String login() {
		return "user/user-login";
	}
	
	@RequestMapping(value= {"login/success"})
	public String success() {
		return "frame/layout";
	}
	
	@RequestMapping(ERROR_PATH)
	public String error() {
		return "frame/error";
	}

	@Override
	public String getErrorPath() {
		return ERROR_PATH;
	}
}
